package com.jy.api.util;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * Created by lihu on 2018/1/8.
 */
@Component
public class StaticsUtil {

    /**
     * 静态api地址
     */
    @Value("${api.statics.address}")
    private String apiStaticsAddress;


    private final String DAILY_MEMBER_URL = "/v1/stores/STOREID/daily-member-statics";

    private final String TOTAL_MEMBER_URL = "/v1/stores/STOREID/total_member_statics";

    private final String LOST_MEMBER_URL = "/v1/stores/STOREID/lost_member_statics";

    private final String LOST_MEMBERIDS_ALL = "/v1/stores/STOREID/lost_memberIds_all";


    /**
     * 获取店铺所有流失会员ID
     *
     * @return
     */
    public String getLostMemberIdsAll() {
        return apiStaticsAddress.concat(LOST_MEMBERIDS_ALL);
    }

    /**
     * 获取会员统计接口
     *
     * @return
     */
    public String dailyMemberStatics() {
        return apiStaticsAddress.concat(DAILY_MEMBER_URL);
    }


    /***
     * 获取会员消费统计接口
     * @return
     */
    public String totalMemberStatics() {
        return apiStaticsAddress.concat(TOTAL_MEMBER_URL);
    }

    /**
     * 获取流失会员信息
     *
     * @return
     */
    public String lostMemberStatics() {
        return apiStaticsAddress.concat(LOST_MEMBER_URL);
    }
}
